home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / indent18.lha / indent-1.8 / memcpy.c < prev    next >
C/C++ Source or Header  |  1993-02-08  |  348b  |  19 lines

  1. /* Copy LEN bytes starting at SRCADDR to DESTADDR.  Result undefined
  2.    if the source overlaps with the destination.
  3.    Return DESTADDR. */
  4.  
  5. #ifdef USG
  6. char *
  7. memcpy (destaddr, srcaddr, len)
  8.      char *destaddr;
  9.      char *srcaddr;
  10.      int len;
  11. {
  12.   char *dest = destaddr;
  13.  
  14.   while (len-- > 0)
  15.     *destaddr++ = *srcaddr++;
  16.   return dest;
  17. }
  18. #endif
  19.